#import <Foundation/Foundation.h>

@class FWListView;
@class FWApplication;
@class FWPreferences;
@class LITableView;


@protocol FWListViewDelegate <NSObject>

- (CGFloat)tableView:(LITableView *)tableView heightForItems:(NSDictionary*)dict application:(FWApplication*)application preferences:(FWPreferences*)prefs;
- (void)tableView:(LITableView*)tableView setDetailsUsingView:(FWListView*)view forItem:(NSDictionary*)dict application:(FWApplication*)app preferences:(FWPreferences*)prefs;
- (UIView*)tableView:(LITableView*)tableView previewWithFrame:(CGRect)rect atIndex:(NSInteger)index forItems:(NSArray*)list application:(FWApplication*)app preferences:(FWPreferences*)prefs;
- (NSString*)tableView:(LITableView*)tableView detailForHeaderInSection:(NSInteger)section application:(FWApplication*)app preferences:(FWPreferences*)prefs;

- (FWListView*)application:(FWApplication*)app cellViewForTableView:(LITableView*)tableView  preferences:(FWPreferences*)prefs;
- (NSArray*)application:(FWApplication*)application fetchNewDataForPrefs:(FWPreferences*)prefs;
- (BOOL)application:(FWApplication*)application shouldUpdateForDate:(NSDate*)date;


@optional

- (NSInteger)tableView:(LITableView*)tableView totalNumberOfItems:(FWApplication*)application preferences:(FWPreferences*)prefs;

- (BOOL)application:(FWApplication*)app isToolbarRequiredForPrefs:(FWPreferences*)prefs;
- (NSArray*)application:(FWApplication*)app toolbarItemsForPrefs:(FWPreferences*)prefs;
- (NSString*)application:(FWApplication*)app toolbarCaptionForPrefs:(FWPreferences*)prefs;
- (NSString*)application:(FWApplication*)app toolbarBadgeForPrefs:(FWPreferences*)prefs;

- (BOOL)application:(FWApplication*)app configureToolbarItems:(NSArray*)items prefs:(FWPreferences*)prefs;

@end
